import axios from 'axios';

export const getChapter = (storyId: any) => axios.get(`m1/storyChapter/getChapters?storyId=${storyId}`)
export const getStyleName = (storyId: any) => axios.get(`m1/story/get?storyId=${storyId}`)
export const getChapterEvaluate = (storyId: any, chapterId: any) => axios({
    method: 'get',
    url: `m1/chapter/comment/page?storyId=${storyId}&chapterId=${chapterId}&pageNo=1&pageSize=10`,
    headers: {
        'c': 'android/model:MuMu,SDK:Android6.0.1(API23)-huoxing/2.7.3/guanwang/000000000000000',
        'x-i': '044aea9bc56b2d32333ae5de6bb47c0fc848f808d0af04ced2a75f1e4f9e9fd238d5b7e7a737655708a1f57435501ba64fab01dd9f8b8fbaa833c31c83a00cd99b6e2da5e87505e2aa429243f71ad0f4',
        'x-s': '589fe85a40ddedc55e65ff28b445518a',
        'x-ssid': '',
        'Accept': '*/*',
    }
})
export const getChapterInEvaluate = (storyId: any) => axios({
    method: 'get',
    url: `m1/chapter/comment/getChapterListForComment?storyId=${storyId}&pageNo=1&pageSize=10000`,
    headers: {
        'c': 'android/model:MuMu,SDK:Android6.0.1(API23)-huoxing/2.7.3/guanwang/000000000000000',
        'x-i': '044aea9bc56b2d32333ae5de6bb47c0fc848f808d0af04ced2a75f1e4f9e9fd238d5b7e7a737655708a1f57435501ba64fab01dd9f8b8fbaa833c31c83a00cd99b6e2da5e87505e2aa429243f71ad0f4',
        'x-s': '589fe85a40ddedc55e65ff28b445518a',
        'x-ssid': '',
        'Accept': '*/*',
    }
})

export const getPersonMsg = (token: String) => axios.get('/h5/user?token=' + token)
export const changeMsg = ({ uname, sex, address, birth, msg, token }) => axios.post(`/h5/changeMsg?uname=${uname}&sex=${sex}&address=${address}&birth=${birth}&msg=${msg}&token=${token}`)
export const sendMoney = (token: string) => axios.get("/h5/sendMoney?token=" + token)
export const addLevels = (token: String) => axios.get("/h5/addLevels?token=" + token)
export const changeBookHistory = (token: String, books: String) => axios.post("/h5/updateBookshelf?token=" + token + "&bookshelf=" + books)
export const selectBook = (token: String) => axios.get("/h5/selectBookshelf?token=" + token)
export const sponsorMoney = (token:String,money:any)=>axios.get("/h5/sponsor?token="+token+"&money="+money)
